package com.traveldesign.controller.admin;

import com.traveldesign.common.Result;
import com.traveldesign.entity.Menu;
import com.traveldesign.service.IMenuService;
import jakarta.annotation.Resource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author wangwang
 * @since 2025-02-23
 */
@RestController
@RequestMapping("/menu")
public class MenuController {
    private static final Logger log = LoggerFactory.getLogger(MenuController.class);
    @Resource
    private IMenuService menuService;
    @GetMapping("/list")
    public Result list(@RequestParam String roleId){
        List list  =menuService.lambdaQuery().like(Menu::getMenuRight,roleId).list();
        return  Result.suc(list);
    }
}
